/*--------------------------------------------------------------------------------------*\
**
** adv_teleporter_exit.cpp
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "adv_teleporter_exit.h"

#include "adventure_frame.h"
#include "adventure_map.h"
#include "adv_object_type.h"
#include "army.h"
#include "basic_dialog.h"
#include "bitmap_group_cache.h"
#include "external_string.h"
#include "hero.h"
#include "object_registration.h"
#include "simple_dialog.h"
#include "stationary_adventure_object.h"

static t_object_registration<t_adv_teleporter_exit> k_registration( k_adv_object_teleporter_exit );

t_adv_teleporter_exit::t_adv_teleporter_exit( std::string const& model_name )
          : t_gateway_base( model_name )
{
}


void t_adv_teleporter_exit::activate_trigger( t_army* army, t_adv_map_point const& point, 
		                                   t_direction direction, t_adventure_frame* frame )
{
	ok_dialog( get_text("initial"), true, get_text("name") );
}

void t_adv_teleporter_exit::destroy()
{
	t_gateway_base::destroy();

	m_map->remove_teleporter_exit( this );
}

void t_adv_teleporter_exit::place( t_adventure_map& map, t_adv_map_point const& point )
{
    t_gateway_base::place( map, point );

    // Add teleporter exit to list of exits.
    map.add_teleporter_exit ( this );
}

